package com.ruoyi.manager.controller;

import com.ruoyi.manager.service.TeachAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.*;

@RequestMapping("/")
@Controller
public class AnalysisController {

    @Autowired
    TeachAnalysisService teachAnalysisService;

    @RequestMapping("/manager/analysis")
    public String toTeachAnalysisPage(){
        return "redirect:/analysis/teachAnalysis.html";
    }
    @ResponseBody
    @RequestMapping("/manager/analysis/listClssesInfo")
    public List<Map<String,Object>> listClassesInfor(){
        return teachAnalysisService.listClassInfor();
    }

    @ResponseBody
    @RequestMapping("/manager/analysis/listExamInfo")
    public List<Map<String,Object>> listExamInfor(){
        return teachAnalysisService.listExamInfor();
    }


    // 田豪举部分
    @ResponseBody
    @RequestMapping("/manager/analysis/findClassesCoreTaskCompleteRate")
    public Map<String, Object> test2(){
        return teachAnalysisService.findClassesCoreTaskCompleteRate();
    }
    @ResponseBody
    @RequestMapping("/manager/analysis/findClassesCoreSubmitRate")
    public Map<String, Object> test3(){
        return teachAnalysisService.findClassesCoreSubmitRate();
    }
    @ResponseBody
    @RequestMapping("/manager/analysis/findClassesCoreTaskCompleteRateLt40")
    public Map<String, Object> test4(){
        return teachAnalysisService.findClassesCoreTaskCompleteRateLt40();
    }
    @ResponseBody
    @RequestMapping("/manager/analysis/findClassesCoreTaskCompleteRateGt80")
    public Map<String, Object> test5(){
        return teachAnalysisService.findClassesCoreTaskCompleteRateGt80();
    }
    @ResponseBody
    @RequestMapping("/manager/analysis/listClassesCoreTaskCompleteRateLt40")
    public List<Map<String, Object>> test6(){
        return teachAnalysisService.listClassesCoreTaskCompleteRateLt40();
    }
    @ResponseBody
    @RequestMapping("/manager/analysis/listEveryClassesCoreTaskCompleteRateAndCoreSubmitRate")
    public List<Map<String, Object>> listEveryClassesCoreTaskCompleteRateAndCoreSubmitRate(){
        return teachAnalysisService.listEveryClassesCoreTaskCompleteRateAndCoreSubmitRate();
    }



    @ResponseBody
    @RequestMapping("/manager/analysis/totalAveragePointPage")
    public Map<String,Object> test7(){
        return teachAnalysisService.totalAveragePoint();
    }

    @ResponseBody
    @RequestMapping("/manager/analysis/classAveragePointPage")
    public List<Map<String,Object>> test8(){
        return teachAnalysisService.classAveragePoint();
    }

    @ResponseBody
    @RequestMapping("/manager/analysis/studentClassifyPage")
    public Map<String,Object> test9(){
        return teachAnalysisService.studentClassify();
    }

    @ResponseBody
    @RequestMapping("/manager/analysis/listTaskInfo")
    public List<Map<String,Object>> listTaskInfor(){
        return teachAnalysisService.listTaskInfor();
    }

    //王家乐--地图
    @ResponseBody
    @RequestMapping("/manager/analysis/listCity")
    public List<Map<String,Object>> test11(){

        List<Map<String,Object>> city= teachAnalysisService.listCity();
        return city;
    }




    @ResponseBody
    @RequestMapping("/manager/analysis/employmentSpacePage")
    public List<Map<String,Object>> employmentSpace(){
        return teachAnalysisService.employmentSpace();
    }
}
